/**
 * Copyright (C) 2009 alex <me@alex.0x08.org>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package uber.netbsd.community.i18n;

import java.io.Serializable;
import java.util.Locale;

/**
 * Объект хранит дополнительную информацию о локали (иконка, код, описание)
 *
 * @author alex
 */
public class LocaleInfo implements Serializable {

    private String icon, desc, code;
    private Locale locale;

    /**
     *
     * @return код локали
     */
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    /**
     *
     * @return собсно локаль
     */
    public Locale getLocale() {
        return locale;
    }

    public void setLocale(Locale locale) {
        this.locale = locale;
    }

    /**
     *
     * @return название на языке оригинала
     */
    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    /**
     *
     * @return иконка (относительный путь до файла)
     */
    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    
    public LocaleInfo addCode(String code) {

        setCode(code);
        return this;
    }

    public LocaleInfo addDesc(String desc) {

        setDesc(desc);
        return this;
    }

    public LocaleInfo addIcon(String icon) {

        setIcon(icon);
        return this;
    }

    public LocaleInfo addLocale(Locale loc) {

        setLocale(loc);
        return this;
    }
    /* public boolean equals(Object o) {

    if (o==null ||!(o instanceof LocaleInfo)) return false;

    }*/
}
